The present invention relates to a print data processing apparatus allowing enlarged characters extending over a plurality of lines to be printed with a minimal memory capacity and without reverse sheet forwarding in which basic data sent from a host computer is divided by a processing unit, intermediate codes are prepared by the processing unit, and finally, print data is output to a print head in the form of a plurality of successive scanning lines.
With respect to serial printers that print on a printing medium by causing a print head to scan across a plurality of successive parallel scanning lines, various methods of printing enlarged characters whose height is double the height of normal characters and which exceeds the height of the print head have heretofore been known.
Among them is a method of temporarily storing a single operation line of data in an input buffer. This method is advantageous in that it is simple and requires a small RAM capacity. However, this method causes a problem in that the host computer is not freed quickly.
In more detail, if the maximum height of a character to be printed is as large as five scanning lines, the print data processing apparatus must repeat five times the operations of calculating an area present on the first scanning line, which is the object to be processed, with respect to the enlarged character data present in the input buffer, developing a bit image thereof in a working RAM; developing and outputting the image in an output buffer while processing such image with modified data, and doing the same for the second scanning line using the same enlarged character present in the input buffer. As a result, the same data is held five times, suspending the reception of subsequent data from the host computer, during which time the computer cannot be freed to perform other tasks.
To overcome this problem, as described in Japanese Patent Unexamined Publication No. 63-72556, there has been proposed an apparatus as shown in FIG. 4(a) in which two output buffers are provided to reduce the processing time. That is, while one of the output buffers is outputting to a print mechanism, data is being developed in the other output buffer. In this method, various programs controlling the print data processing apparatus are stored in a program ROM 40 and controlled by a CPU.
The print data processing apparatus receives basic data sent from a host computer through an interface 25 and stores the basic data in an input buffer 26. A data analyzing section 6 receives the basic data from the input buffer 26 and classifies the data into character data, print start commands, and other types of commands. Processing is performed for the other types of commands. For the character data, bit map data corresponding to the character data is read from a font ROM 41 and is temporarily developed in a working RAM 42. While processing such image data in the working RAM 42 with necessary modifications, the thus-processed data is developed in the currently selected output buffer 37 through an input channel 28 when all the modifications have been processed.
The input channel 28 switches the output buffer 37 upon being triggered by a print start command. If the output buffer 37 selected by the input channel 28 is concurrently selected by an output channel 35, all the output buffer data is outputted to a print mechanism 39 and the operation of writing data to the output buffer 37 is interrupted until the output channel 35 is switched. The output channel 35 sends the image data from the currently selected output buffer 37 to the print mechanism 39 through an output interface 38 to thereby effect printing. The output channel 35 switches the output buffer 37 to be printed thereafter using the completion of printing of all the images in the output buffer 37 as a trigger. If no print image is present in the output buffer 37 selected by the output channel 35, no printing operation is performed until a next print start command is received.
The foregoing is the sequence of operations in the case of normal characters. Even if a line to be processed includes an enlarged character extending over two scanning lines, a character developing section 18 develops the upper half and the lower half of the enlarged character in either output buffer 37 and the developed halves are sequentially printed.
According to this method, the basic data stored in the input buffer can be processed efficiently, thus allowing the throughput to be improved. Further, if a plurality of output buffers are provided, the time period for which the input buffer is freed can be further reduced.
On the other hand, the output buffer 37 corresponding to a plurality of scanning lines must be implemented by a RAM, which entails the problem of reserving a large storage capacity.
A method designed not to impede the freeing of the host computer has further been proposed. That is, a minimal capacity of the input buffer is reserved while providing a certain area in the RAM for the plurality of scanning lines. This is an attempt to minimize the RAM capacity while not retarding the freeing of the host computer by converting the basic data sent from the host computer and stored in the input buffer to intermediate codes, and storing the converted data as the intermediate codes in the intermediate buffer.
This method will be described in more detail with reference to FIG. 4(b). Similarly to the example shown in FIG. 4(a), various programs for controlling the print data processing apparatus are stored in the program ROM 40 and controlled by the CPU.
The print data processing apparatus receives basic data sent from a host computer through the interface 25 and the received basic data is stored in the input buffer 26. An intermediate code converting section 27 converts the basic data stored in the input buffer 26 to intermediate codes and the intermediate codes are temporarily stored in an intermediate buffer 29. The character developing section 18 retrieves the intermediate codes from the intermediate buffer 29 upon being triggered by a print start command. The character developing section 18 analyzes the intermediate codes and reads the corresponding image data from the font ROM 41.
If the character is a character whose height is double that of the normal character, only images to be printed at the current head positions are retrieved, whereas if the character is a normal character, all the images are developed in the working RAM 42. While adding necessary modifications to the image data in the working RAM 42, the data as modified are developed in the output buffer 37. When a single line of data has been developed, the image data in the output buffer 37 is sent to the print mechanism 39 through the output interface 11, so that printing is started. In the case of normal characters, the intermediate buffer 29 is cleared at this point of the operation, and the data converting operation for the next line is started. If, on the other hand, a double-height character is present in the line, the lower half image is developed and outputted before the intermediate buffer 29 is cleared.
This method, employing an intermediate code, can handle a large volume of data with a small storage capacity and the data is easy to develop, allowing the host computer to be freed in a short period of time without requiring a large storage capacity. The throughput can also be improved.
However, this intermediate code-based method involves reverse sheet forwarding in order to process an enlarged character in the scanning line C, the enlarged character extending into the scanning line B, after having processed the scanning lines A and B as shown in FIG. 6. Such reverse sheet forwarding reduces the throughput and increases sheet forwarding errors due to backlash, thus impairing the print quality.